###############################################################################
##
## $Id$
##
## Copyright (C) 2008 Josh Guilfoyle <jasta@devtcg.org>
##
## This program is free software; you can redistribute it and/or modify it
## under the terms of the GNU General Public License as published by the
## Free Software Foundation; either version 2, or (at your option) any
## later version.
##
## This program is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
## General Public License for more details.
##
###############################################################################

AC_INIT(five-server, 0.0.1, http://five.googlecode.com)
AM_INIT_AUTOMAKE(five-server, 0.0.1)
AM_CONFIG_HEADER(config.h)

AC_PROG_CC
AC_PROG_LIBTOOL

PKG_CHECK_MODULES(GLIB, glib-2.0 gthread-2.0)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)

PKG_CHECK_MODULES(LIBSYNCML, libsyncml-1.0 >= 0.4.5)
AC_SUBST(LIBSYNCML_CFLAGS)
AC_SUBST(LIBSYNCML_LIBS)

PKG_CHECK_MODULES(LIBSOUP, libsoup-2.2 >= 2.2.91)
AC_SUBST(LIBSOUP_CFLAGS)
AC_SUBST(LIBSOUP_LIBS)

PKG_CHECK_MODULES(SQLITE3, sqlite3)
AC_SUBST(SQLITE3_CFLAGS)
AC_SUBST(SQLITE3_LIBS)

PKG_CHECK_MODULES(TAGLIB, taglib)
AC_SUBST(TAGLIB_CFLAGS)

# Hack to use the C bindings.  There should be a separate pkg-config entry for
# this, but there doesn't seem to be.
TAGLIB_LIBS="-ltag_c"
AC_SUBST(TAGLIB_LIBS)

PKG_CHECK_MODULES(WAND, Wand)
AC_SUBST(WAND_CFLAGS)
AC_SUBST(WAND_LIBS)

AC_CONFIG_FILES([Makefile
	src/Makefile])

AC_OUTPUT
